/**
 * Created by zhoushg on 2017/9/29.
 */
import getData from './funcs/getData'
import {isEmptyObject, isEmptyStr, isRange} from './funcs/required'
import {toast} from '../utils/gui_main'
import { getToken } from '../utils/auth'
 // addCode
			// r1eSER5hG Start
			
        export function GTceshi (params) { // 测试111sss
            var data = params
            return new Promise(resolve => {
            
        if (isEmptyStr(data.phone)) {
          toast.warn('电话不能为空')
          resolve(false)
          return
        }
          if(!isRange(data.phone,10,"")){
            toast.warn('电话输入不正确')
            resolve(false)
            return
          }
						
            let data2 = {
              
            phone: data.phone, // 电话
            id: data.id, 
            limit: data.limit 
            }
            params = data2
            params.token = getToken()
              function callBack (data) {
                resolve(data)
              }
              getData({
                url: '/test/ceshi',
                method: 'get',
                params
              }, callBack)
            })
          }
        
			// r1eSER5hG end
			